clear
[ video_file_name,video_file_path ] = uigetfile({'*.avi'});

input_video_file = [video_file_path,video_file_name];
% Read Video
videoFReader = VideoReader(input_video_file);
%%

frames=read(videoFReader);
mean_frame=mean(frames,4);

figure()
imshow(mean_frame/255)
imwrite(mean_frame/255,'Mean_Frame.png')
